﻿<navigation:Page x:Class="SampleBrowser.Views.SampleLoadingStrategies" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:doc="http://schemas.firstfloorsoftware.com/documenttoolkit"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Loading Strategies">
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="136" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBlock x:Name="HeaderText" Grid.ColumnSpan="2" Style="{StaticResource HeaderTextStyle}" Text="Loading Strategies"/>
        <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Text="Select a source from the Load From combo below" Margin="0,0,0,4" />

        <doc:DocumentDataSource x:Name="DataSource" LoadError="DataSource_LoadError">
            <doc:DocumentDataSource.LoadPageSettings>
                <doc:LoadFixedPageSettings AllowAsyncLoadImage="True" />
            </doc:DocumentDataSource.LoadPageSettings>
        </doc:DocumentDataSource>

        <doc:ThumbnailListBox x:Name="Thumbnails" Grid.Row="2" DocumentDataSource="{Binding ElementName=DataSource}" PageIndex="{Binding PageIndex, Mode=TwoWay, ElementName=Navigator}" />

        <doc:DocumentViewer x:Name="Viewer"
                            Grid.Column="1" Grid.Row="2"
                            DocumentDataSource="{Binding ElementName=DataSource}"
                            ViewMode="{Binding SelectedViewMode, ElementName=ViewModePicker}">
        </doc:DocumentViewer>

        <StackPanel Grid.ColumnSpan="2" Grid.Row="3" Orientation="Horizontal" Margin="0,8,0,0" HorizontalAlignment="Center">
            <doc:HistoryNavigator History="{Binding History, ElementName=Viewer}" />
            <doc:PageNavigator x:Name="Navigator"
                               PageCount="{Binding PageCount, ElementName=Viewer}"
                               PageIndex="{Binding PageIndex, ElementName=Viewer, Mode=TwoWay}"
                               Margin="4,0,0,0" />
            <doc:ViewModePicker x:Name="ViewModePicker" Margin="4,0,0,0" />
            <TextBlock Text="Load From:" VerticalAlignment="Center" Margin="8,0,4,0" />
            <ComboBox x:Name="cmbLoadFrom" Width="150" SelectionChanged="cmbLoadFrom_SelectionChanged">
                <ComboBox.Items>
                    <ComboBoxItem Content="Isolated Storage" />
                    <ComboBoxItem Content="Local Disk" />
                    <ComboBoxItem Content="Web All-In-Once" />
                    <ComboBoxItem Content="Web Just-In-Time" />
                    <ComboBoxItem Content="WCF Service" />
                </ComboBox.Items>
            </ComboBox>
        </StackPanel>
    </Grid>
</navigation:Page>
